#coding:utf-8
from django.http import HttpResponse
from django.shortcuts import render
from django.urls import reverse
from polls import models

# Create your views here.
'''
def detail(request, question_id):
    return HttpResponse("You're looking at question %s." % question_id)

def results(request, question_id):
    response = "You're looking at the results of question %s."
    return HttpResponse(response % question_id)

def vote(request, question_id):
    return HttpResponse("You're voting on question %s." % question_id)

'''

def lg(request):
    #List = map(str,range(100))
    string = u"我在自强学堂学习Django，用它来建网站"
    return render(request,'login.html',{'string':string})

def zc(request):
            # List = map(str,range(100))
            string = u"我在自强学堂学习Django，用它来建网站"
            return render(request, 'index.html', {'string': string})

#def Zhu_Ce(request):


def xs(req):
    models.nameuser.object.create(phone='15766264277',nickname='huihui',email='1132771621@qq.com',password='123456')
    return HttpResponse('ok')






        #return render(request,'css.html')


'''
def old_add2_redirect(request, a, b):

    return HttpResponseRedirect(
        reverse('add2', args=(a, b))
    )
'''